CXXFLAGS  = \
	-O0 -g -Wall -I../../libbamp/include -I../../bamp \
	-DBOOST_FILESYSTEM_VERSION=3
LDFLAGS   = \
	-L../../libbamp/src -lbamp \
	-lboost_thread -lboost_system -lboost_iostreams -lboost_filesystem \
	-lboost_unit_test_framework \
	-static -pthread

SRC_FILES = *.cpp
ALL_OBJ   = main.o \
	../../bamp/process_unix.o ../../bamp/message_ack.o \
	../../bamp/async_loop.o
DEP_LIB   = ../../libbamp/src/libbamp.a
OUT       = bamp_test

.PHONY: all clean 

all: echo $(OUT)

echo: echo.cpp
	$(CXX) -o $@ $^

$(OUT): $(ALL_OBJ) $(DEP_LIB) $(DEP_OBJ)
	$(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS)

clean:
	rm -f $(ALL_OBJ) $(OUT) .depend echo

.depend: $(SRC_FILES)
	$(CXX) $(CXXFLAGS) -MM $^ > .depend

-include .depend
